import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author chen
 */
public class GenericLearnC<T> {
//public class GenericLearnC<T extends Number> {
    /**
     * t:
     */
    T t;

    public void function() {
        System.out.println(t.getClass());
        System.out.println(t);
    }

    public  GenericLearnC(T t){
        this.t=t;
    }

    public static void main(String[] args) {
        GenericLearnC<Integer> c = new GenericLearnC<>(1);
        c.function();

        GenericLearnC<String> c1 = new GenericLearnC<>("11wase");
        c1.function();
    }

    public static <T> void test(List<T> a) {
        System.out.println(a.get(0).getClass());
        System.out.println(a.get(1).getClass());
    }

    public static void test2(Map<? extends String, ? super Integer> m) {
        System.out.println(m.keySet());
    }

}
